<?
class Yamarket_Form_Categories extends Zend_Form{
    public function init(){
		$translator = new Zend_Translate(
          'array',
          APPLICATION_PATH.'/../library/Nippy/languages/lang.ru.php',
          'ru',
          array('scan' => Zend_Translate::LOCALE_DIRECTORY)
        );
		Zend_Validate_Abstract::setDefaultTranslator($translator);
        $this->addElement('text', 'Id', array(
            'label'      => 'ID:',
        	'filters'    => array('StringTrim','StripTags'),
            'required'   => true,
        	'validators' => array('Int')
            )
        );
        $this->addElement('text', 'ParentId', array(
            'label'      => 'ParentId:',
        	'filters'    => array('StringTrim','StripTags'),
            'required'   => true,
        	'validators' => array('Int')
            )
        );
        $this->addElement('text', 'Name', array(
            'label'      => 'Name:',
        	'filters'    => array('StringTrim','StripTags'),
            'required'   => true,
        	'validators' => array(array('validator' => 'StringLength', 'options' => array(1, 255)))
            )
        );
	}
}
?>